import cv2
import numpy as np

src = np.array([[0,0], [200, 0], [0, 200]], np.float32)
dst = np.array([[0, 0], [100, 0], [0, 100]], np.float32)

A = cv2.getAffineTransform(src, dst)
print("Use function ===> ")
print(A)

'''use matrix'''
src = np.array([[0.5, 0, 0], [0, 0.5, 0], [0, 0, 1]]) ## scale
dst = np.array([[1, 0, 100], [0, 1, 200], [0, 0, 1]]) ## move

A = np.dot(src, dst)
print("Use matrix ===>")
print(A)